package com.higgins.lawapp.client.settings.dataModel;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@SuppressWarnings("serial")
public class DataSourceDTO implements Serializable {
	private String dataSourceNameKey;
	private String dataSourceName;
	private String dataSourceURL;
	private Boolean dataSourceExecute;
	private List<DataSourceLevelDTO> dataSourceLevelDTOs = new ArrayList<DataSourceLevelDTO>();
	
	public DataSourceDTO()	{
		
	}
	public void setDataSourceNameKey(String dataSourceNameKey)	{
		this.dataSourceNameKey = dataSourceNameKey;
	}
	public String getDataSourceNameKey()	{
		return dataSourceNameKey;
	}
	public void setDataSourceName(String dataSourceName)	{
		this.dataSourceName = dataSourceName;
	}
	public String getDataSourceName()	{
		return dataSourceName;
	}
	public void setDataSourceURL(String dataSourceURL)	{
		this.dataSourceURL = dataSourceURL;
	}
	public String getDataSourceURL()	{
		return dataSourceURL;
	}
	public void setDataSourceExecute(Boolean dataSourceExecute)	{
		this.dataSourceExecute = dataSourceExecute;
	}
	public Boolean getDataSourceExecute()	{
		return dataSourceExecute;
	}
	public void addDataSourceLevelDTO(DataSourceLevelDTO dataSourceLevelDTO)	{
		dataSourceLevelDTOs.add(dataSourceLevelDTO);
	}
	public List<DataSourceLevelDTO> getDataSourceLevelDTOs()	{
		return dataSourceLevelDTOs;
	}
	public DataSourceLevelDTO getDataSourceLevelDTO(int index)	{
		DataSourceLevelDTO dataSourceLevelDTO;
		if (dataSourceLevelDTOs.size() > index)	{
			dataSourceLevelDTO =  dataSourceLevelDTOs.get(index);
		}		else	{
			dataSourceLevelDTO =  new DataSourceLevelDTO();
			dataSourceLevelDTOs.add(dataSourceLevelDTO);
		}
		
		return dataSourceLevelDTOs.get(index);
	}
	public void removeDataSourceLevelDTO(int index)	{
		dataSourceLevelDTOs.remove(index);
	}
}
